package com.wanyangproject.androidlearning.multiThread.SuiTangEmpires;

public class KeyPersonThread extends Thread {


    public KeyPersonThread(String name) {
        super(name);
    }

    @Override
    public void run() {
        String name = getName();
        System.out.println(String.format("%s上场了。。。",name));

        for (int i =0 ;i< 10;i++){
            try {
                Thread.sleep(500);
                System.out.println(String.format("%s左突右冲，攻击了%d次。。。",name,i));
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

    }
}
